

<%@page contentType="text/html" pageEncoding="UTF-8" language="java" import ="java.util.*" import ="java.text.DecimalFormat" import="java.sql.*" errorPage="ErrorPage.jsp" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<jsp:useBean id="model" scope="session" class="mvc.model.WebModel"/>
<%@page import="mvc.controller.ControllerServlet"  %>

<%
System.out.println("----//INITMODEL----llegada----");
model.init(application); %>

<%

    request= (HttpServletRequest)pageContext.getRequest();
    String BASEURL= request.getContextPath();//Permite ir a la ruta inicial del proyecto.
    String CONTROLLER=BASEURL + "/controller";
   //exception.printStackTrace();
 %>


 <html>
<head>
<title>UBICACION DE ABASTOS FERRETERIA BARATONGO</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf8" />
<script type="text/javascript" src="view.js"></script>

<link href="<%=request.getContextPath()%>/view.css"   rel="stylesheet" type="text/css" media="all">
<link href="<%=request.getContextPath()%>/stylesheet.css" rel="stylesheet" type="text/css" media="all" />
<link href="<%=request.getContextPath()%>/menudos.css" rel="stylesheet" type="text/css" media="all" />

<style type="text/css">
 p.MsoNormal
	{margin-top:0cm;
	margin-right:0cm;
	margin-bottom:10.0pt;
	margin-left:0cm;
	line-height:115%;
	font-size:11.0pt;
	font-family:"Calibri","sans-serif";
	}
</style>
 <script language="javascript" type="text/javascript">

    function validacion(formulario) {

	var er_codigo = /^([0-9\s\+\-])+$/	
	var er_nombre = /^([a-z]|[A-Z]|�|�|�|�|�|�|�|\s|\.|-)+$/
        var er_valor = /^([0-9\s\+\-])+$/						
	var er_descripcion = /^([a-z]|[A-Z]|�|�|�|�|�|�|�|\s|\.|-)+$/
       
	var er_email = /^(.+\@.+\..+)$/
	var x

	//comprueba 50 caracteres maximo
	for(x = 1; x < 5; x++) {
		if (formulario.elements[x].value.length > 50) {
			alert('La lontitud m�xima permitida para cualquier campo es de 10 caracteres.')
			return false
		}
	}

	//comprueba campo del codigo


	//comprueba campos de valor
	if( !er_valor.test(formulario.valor.value) ) {
		alert('CONTENIDO DEL CAMPO VALOR INVALIDO')
		return false
	}

	//comprueba campo de descripcion
	if(!er_descripcion.test(formulario.descripcion.value)) {
		alert('CONTENIDO DEL CAMPO DESCRIPCION INVALIDO')
		return false
	}
}

</script>
   
        




</head>

<body>

<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td align="center" valign="top"><table width="760" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td align="left" valign="top">
		<table border="0" cellspacing="0" cellpadding="0" style="height: 255px; width: 825px;">
          <tr>
            <td width="200" align="left" valign="top" bgcolor="#424242">
			<table width="200" border="0" cellspacing="0" cellpadding="0" style="height: 227px">
              <tr>
                <td align="center" valign="middle" class="logo_bg" style="width: 200px">
				<img src="mvc.Logos/proveedor 40x40.png" width="67" height="65" /></td>
              </tr>
              <tr>
                <td align="left" valign="top" style="width: 200px">
				<table width="200" border="0" cellspacing="0" cellpadding="0" style="height: 186px">
                  <tr>
                    <td class="on" onmouseover="this.className='on'"onmouseout="this.className='off'" height="30" align="left" valign="middle" style="height: 30px"><a href="PagInicio.jsp" class="left_menu_text" >
					inicio</a></td>
                  </tr>
                  <tr>
                    <td class="off" onmouseover="this.className='on'" onmouseout="this.className='off'" height="30" align="left" valign="middle"><a href="servicios.jsp" class="left_menu_text">
					Servicios</a></td>
                  </tr>
                  <tr>
                    <td class="off" onmouseover="this.className='on'" onmouseout="this.className='off'" height="30" align="left" valign="middle"><a href="nuestraempresa.jsp" class="left_menu_text">
					Nuestra empresa</a></td>
                  </tr>
                  <tr>
                    <td class="off" onmouseover="this.className='on'" onmouseout="this.className='off'" height="30" align="left" valign="middle"><a href="productos.jsp" class="left_menu_text">
					Productos</a></td>
                  </tr>
                  <tr>
                    <td class="off" onmouseover="this.className='on'" onmouseout="this.className='off'" height="30" align="left" valign="middle"><a href="clientes.jsp" class="left_menu_text">
					Clientes</a></td>
                  </tr>
                  <tr>
                    <td class="off" onmouseover="this.className='on'" onmouseout="this.className='off'" align="left" valign="middle" style="height: 17px"><a href="secciones.jsp" class="left_menu_text">
					Secciones</a></td>
                  </tr>
                </table></td>
              </tr>
            </table></td>
            <td width="560">
			<table border="0" cellspacing="0" cellpadding="0" style="width: 736px; height: 159px;">
              <tr>
                <td align="left" valign="top" class="header_top_image" style="height: 250px; width: 556px;">
				</td>
              </tr>
              <tr>
   <td>
       
  <ul id="HDropdown-orange-classic">

<li><a href="#" title="Producto">Producto</a>
<ul>
<li><a href="producto_registrar.jsp">Registrar </a></li>
<li><a href="#">Listar </a></li>
<li><a href="#">Modificar </a></li>
<li><a href="#">eliminar </a></li>
</ul>
</li>
<li><a href="#" title="Usuario">Usuario</a>
<ul>
<li><a href="usuario_registrar.jsp">Registrar </a></li>
<li><a href="#">Listar </a></li>
<li><a href="#">Modificar </a></li>
<li><a href="#">eliminar </a></li>
</ul>
</li>
<li><a href="#" title="Provedor">Proveedor</a>
<ul>
<li><a href="proveedor_registrar.jsp">Registrar </a></li>
<li><a href="#">Listar </a></li>
<li><a href="#">Modificar </a></li>
<li><a href="#">eliminar </a></li>
</ul>
</li>
<li><a href="<%=request.getContextPath()%>/PagInicio.jsp" title="Salir">Salir</a></li>
</ul>




                </td>
              </tr>
            </table></td>
      </tr>
        </table></td>
      </tr>
      <tr>
        <td align="left" valign="top">
            <table width="100%" border="0" cellpadding="0" cellspacing="0" class="body_table">
          <tr>
            <td class="news_text"   align="left" valign="top" bgcolor="#EFEFEF" style="width: 231px"><table width="200" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td style="padding:11px; border-bottom:2px solid #FFF; " align="center" valign="top">
		<table border="0" cellspacing="0" cellpadding="0" style="width: 182px">
                    <tr>
                      <td align="left"><img src="mvc.images/news.gif" alt="" width="156" height="26" /></td>
                    </tr>
                    <tr>
                      <td  style="padding-top:10px; text-align:justify;" align="left"><strong style="text-decoration:underline;">07.11.2011</strong><br />
                        Nam lacinia risus. Aliquam volutpat aliquam augue. Aliquam nulla ante, Aliquam nulla ante, varius<br />
                        <br />
                        <strong style="text-decoration:underline;">07.11.2011</strong><br />
                        Nam lacinia risus. Aliquam volutpat aliquam augue. Aliquam nulla ante, Aliquam nulla ante, varius<br />
                        <br />
                        <strong style="text-decoration:underline;">07.11.2011</strong><br />
Nam lacinia risus. Aliquam volutpat aliquam augue. Aliquam nulla ante, Aliquam nulla ante, variusNam lacinia risus. Aliquam volutpat aliquam augue. Aliquam nulla ante, Aliquam nulla ante, varius</td>
                    </tr>
                </table></td>
              </tr>
              <tr>
                <td align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td align="left" valign="top">&nbsp;</td>
                  </tr>
                  <tr>
                    <td align="center" valign="top"><img src="mvc.images/map.jpg" alt="" width="112" height="63" /></td>
                  </tr>
                  <tr>
                    <td align="left" valign="top">&nbsp;</td>
                  </tr>
                  <tr>
                    <td align="center" valign="top"><a href="pagInicioubicacion.jsp" class="orange_link">	Ubicacion</a></td>
                  </tr>
                </table></td>
              </tr>
            </table></td>
               <td style="padding:12px;" align="left" valign="top">

                <div id="form_container">

		<h1><a>Registrar Producto</a></h1>

               <form onsubmit="return validacion(this)" name="FormValidacion" id="form" class="appnitro"  method="post" action="<%=CONTROLLER%>/Registrar/Productos">
               <div class="form_description">
                            <h2>Registrar Producto</h2>

                            <p>Registra los producto en la base de datos.</p>
                </div>
                    <ul >
                    <li id="li_1" >
                        <label class="description" for="element_1">Codigo Producto </label>
                        <div>
                             <input id="codigo" name="codigo" class="element text medium" type="text" maxlength="255" value=""/>
                        </div>
                    </li>
                    <li id="li_2" >
                        <label class="description" for="element_2">Nombre Producto </label>
                        <div>
                             <input id="nombre" name="nombre" class="element text medium" type="text" maxlength="255" value=""/>
                        </div>
                    </li>
                    <li id="li_3" >
                            <label class="description" for="element_3">Valor Producto </label>
                       <div>
                                <input id="valor" name="valor" class="element text medium" type="text" maxlength="255" value=""/>
                        </div>
                    </li>
                    <li id="li_4" >
                        <label class="description" for="element_4">Descripcion  </label>
                        <div>
                            <input id="descripcion" name="descripcion" class="element text medium" type="text" maxlength="255" value=""/>
                        </div>
                    </li>
                    <li class="buttons">

                        <input id="saveForm" class="button_text" type="submit" name="submit" value="Enviar" />
                        <input type="reset"  class="button_text" name="formReset" />
                    </li>
                    </ul>
		</form>

           </div>


<%
System.out.println("----//FINALIZACION -------SALIDA ----------------");
 %>


              </td>

          </tr>
        </table></td>
      </tr>
      <tr>
        <td align="left" valign="top">
		<table border="0" cellspacing="0" cellpadding="0" style="width: 825px">
          <tr>
            <td align="center" valign="middle" bgcolor="#669900" style="border-top:2px solid #FF9900; padding-left:20px; font-size:11px; font-family:Verdana, Arial, Helvetica, sans-serif;">ABASTOS Y FERRETERIA BATONGO <br />
PASACABALLOS Calle 15 #918<br />
              Cartagena<br />
			</td>
<!--
We request you retain the full web design copyright notice below including the link to http://www.sarkis-webdesign.com
This not only gives respect to the large amount of time given freely by the designer but also helps build interest, traffic and use of template. If you cannot (for good reason) retain the full design copyright we request you at least leave in place the image Web designer - Sarkis, with linked to http://www.sarkis-webdesign.com. Good luck!

Web designer Sarkis
// -->
                      </tr>
        </table></td>
      </tr>
    </table></td>
  </tr>
</table>
 
     
</body>
</html>
              

